const panelAction = [{
  id: 'fullScreen',
  name: '全屏显示', //全屏显示 需要用户行为激活,如按钮，快捷键。语音指令无法使用！
  type: 'system',
  exec: app => {
    app.fullScreen()
  }
},
{
  id: 'exitScreen',
  name: '退出全屏',
  type: 'system',
  exec: app => {
    app.exitScreen()
  }
},
{
  id: 'toggleFullScreen',
  name: '切换全屏',
  type: 'system',
  exec: app => {
    app.toggleFullScreen()
  }
},
{
  id: 'panelServer.close',
  name: '关闭控制面板',
  type: 'system',
  exec: app => {
    app.panelServer.close()
  }
},
{
  id: 'panelServer.open',
  name: '打开控制面板',
  type: 'system',
  exec: app => {
    app.panelServer.open()
  }
},
{
  id: 'panelServer.toggle',
  name: '切换控制面板',
  type: 'system',
  exec: app => {
    app.panelServer.toggle()
  }
},
{
  id: 'panelServer.reset',
  name: '重置设置',
  type: 'system',
  exec: app => {
    app.panelServer.reset()
  }
},
{
  id: 'panelServer.closeConsole',
  name: '关闭控制台',
  type: 'system',
  exec: (app, params) => {
    app.panelServer.closeConsole()
  }
},
{
  id: 'panelServer.openConsole',
  name: '打开控制台',
  type: 'system',
  exec: (app, params) => {
    app.panelServer.openConsole()
  }
},
{
  id: 'panelServer.toggleConsole',
  name: '切换控制台',
  type: 'system',
  exec: (app, params) => {
    app.panelServer.toggleConsole()
  }
},
{
  id: 'panelServer.activeTab',
  name: '切换Tab',
  type: 'system',
  exec: (app, params) => {
    if (params.key) {
      let key = params.key
      app.panelServer.activeTab(key.slice(-1))
      return
    }
    const result = params[1]
    switch (result) {
      case '系统设置':
        app.panelServer.activeTab('1')
        break
      case '项目设置':
        app.panelServer.activeTab('2')
        break
      case '开发者':
        app.panelServer.activeTab('3')
    }

  }
},
{
  id: 'panelServer.nextTab',
  name: '切换到下一个Tab',
  type: 'system',
  exec: (app, params) => {
    app.panelServer.nextTab()
  }
},
{
  id: 'panelServer.prevTab',
  name: '切换到上一个Tab',
  type: 'system',
  exec: (app, params) => {
    app.panelServer.prevTab()
  }
},
{
  id: 'panelServer.toggleBlock',
  name: '模块控制',
  type: 'system',
  exec: (app, params) => {
    let key = params.key
    app.panelServer.toggleBlock(key.slice(-1))
  }
}
]
export default panelAction